package test.mllib.classification.DecisionTree;

import java.io.FileOutputStream;
import java.io.IOException;

public class MakeFile {
	public static void main(String[] args) throws IOException {
		FileOutputStream fos = new FileOutputStream("./sparkdata/mllib/DecisionTreeTest.txt");
		
		for(int i = 0; i < 100000; i ++){
			
			int x1 = (int)(Math.random() * 10000) + 1;
			int x2 = (int)(Math.random() * 10000) + 1;
			int x3 = (int)(Math.random() * 10000) + 1;
			int x4 = (int)(Math.random() * 10000) + 1;

			int y = 0;
			if(x1 > 8000){
				y = 1;
			} else {
				if(x2 > 8000){
					y = 2;
				} else {
					if(x3 > 8000){
						y = 3;
					} else {
						if(x4 > 8000){
							y = 4;
						}
					}
				}
			}
			System.out.println(y);
			fos.write((y+","+x1+" "+x2+" "+x3+" "+x4+"\n").getBytes());
		}
		fos.close();
	}
}
